[about].vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <div class="self_background">
  3. <StoreHeaderCat />
  4. <div class="wrap clearfix">
  5. <div class="sr-layout-block J-block sr-comProfile">
  6. <div class="sr-txt-title">
  7. <h2 class="sr-txt-h2">{{L['公司简介']}}</h2>
  8. </div>
  9. <div class="sr-comProfile-info-wrap cf">
  10. <div class="sr-comProfile-info-l">
  11. <img
  12. v-show="imgTopArr.data.length == 1"
  13. :src="imgTop"
  14. />
  15. <SliderStoreAbout v-show="imgTopArr.data.length > 1" :itemData="imgTopArr.data" :itemIndex="0"/>
  16. </div>
  17. <div class="sr-comProfile-infos infos-top">
  18. <div
  19. class="J-txt-wrap sr-comProfile-intro"
  20. :class="showMore || !showMoreBtn ? 'more' : ''">
  21. <div ref="contentWrap" class="intro-cnt J-txt-cnt" v-html="contentTop"></div>
  22. <a
  23. v-if="showMoreBtn"
  24. href="javascript:void(0);"
  25. class="sr-comProfile-more J-show-more"
  26. rel="nofollow"
  27. @click="showMoreFun"
  28. >{{ showMore ? L["收起"] : L["查看更多"] }}</a
  29. >
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="sr-layout-block pad-block J-block ">
  35. <div class="sr-txt-title">
  36. <h2 class="sr-txt-h2">{{L['公司展示']}}</h2>
  37. </div>
  38. <!--公司展示-->
  39. <SliderStore :itemData="compayShow.data" :itemIndex="0"/>
  40. </div>
  41. <!--荣誉资质-->
  42. <div class="sr-layout-block pad-block J-block ">
  43. <div class="sr-txt-title">
  44. <h2 class="sr-txt-h2">{{L['荣誉展示']}}</h2>
  45. </div>
  46. <SliderStore :itemData="honors.data" :itemIndex="1"/>
  47. </div>
  48. </div>
  49. </div>
  50. </template>
  51. <script setup>
  52. // import { lang_zn } from "@/assets/language/zh.js";
  53. import { getCurLanguage } from '@/composables/common.js';
  54. // const L = lang_zn;
  55. const L = getCurLanguage();
  56. const showMore = ref(false);
  57. const { proxy } = getCurrentInstance();
  58. const router = useRouter();
  59. const route = useRoute();
  60. const vid = calcUrlShopId(route.path);
  61. const compayShow = reactive({ data:[]});
  62. const honors = reactive({data:[]})
  63. const imgTopArr = reactive({data:[]})
  64. const imgTop = ref('')
  65. const contentTop = ref('')
  66. const contentWrap = ref(null)
  67. const showMoreBtn = ref(false)
  68. useHead({
  69. title: 'Store About Us',
  70. meta: [
  71. {
  72. name: "description",
  73. content:'Store About Us',
  74. },
  75. {
  76. name: "keywords",
  77. content: 'Store About Us',
  78. },
  79. ],
  80. });
  81. const showMoreFun = () => {
  82. showMore.value = !showMore.value;
  83. };
  84. const getData = async () => {
  85. const {data:value} = await useFetchRaw(apiUrl + 'v3/seller/front/store/detail?storeId='+vid)
  86. const res = value._rawValue
  87. if(res.state == 200){
  88. honors.data = res.data.storeCertificateList
  89. compayShow.data = res.data.storeCompanyShowList
  90. imgTopArr.data = res.data.storeProfileList
  91. imgTop.value = res.data.storeProfileList[0].imgUrl
  92. contentTop.value = (res.data.storeProfileTextList != null ? res.data.storeProfileTextList.content : '')
  93. await nextTick()
  94. if(contentWrap.value.clientHeight > 290){
  95. showMoreBtn.value = true
  96. }else{
  97. showMoreBtn.value = false
  98. }
  99. }
  100. }
  101. getData();
  102. onMounted(() => {
  103. setTimeout(() => {
  104. sldStatEvent({ behaviorType: 'spv', storeId: vid ,pageUrl: defaultUrl + router.currentRoute.value.path, referrerPageUrl: apiUrl });
  105. }, 3000)
  106. });
  107. </script>
  108. <style lang="scss" scoped>
  109. @use "@/assets/style/base.scss" as *;
  110. @use "@/assets/style/store/contac-about.scss" as *;
  111. .sld_store_list {
  112. :deep .sld_vendor_goods{
  113. width: 1140px;
  114. }
  115. }
  116. </style>